<!--#include file="system32.asp"-->
<!--#include file="user_meun_html.asp"-->


<%
Response.AddHeader"pragma","no-cache" 
Response.AddHeader"cache-control","no-store" 
Call page_load()
if request("submit")<>"" then 
	if lcase(trim(request("user_img")))<>lcase(session("GetCode")) then 
		response.write (CoutError(1,"验证码错误，3秒后返回登陆页."))
		response.write (CoutError(6,"login.asp"))
	else
		Dim tempname,temppassword,temparr
		tempname = trim(replace(request("user_name"),"'",""))
		temppassword = MD5(request("user_password"))
		temparr = UserNamePassword(tempname,temppassword)
		if isarray(temparr) then 
			'验证成功，写入session等
				call SaveInsession(UserConstArr(),temparr)
				call SaveInCookies(UserConstArr(),temparr,CookiesExpires)'默认保存	CookiesExpires 天

				response.write (CoutError(1,"登陆成功，3秒后返回你的管理平台."))
				response.write (CoutError(6,"default.asp"))
		else
				response.write (CoutError(1,"通行证验证失败，3秒后返回登陆页."))
				response.write (CoutError(6,"login.asp"))
		End if 
	End if 
else 
 %>
<div id="login_div">
	<div class='bgdiv'>你的登录框</div>
	<form name="thisForm" method="post"  onsubmit="return CheckForm(this)">
		<label>名字:<input  type="text" name="user_name"   check=".{2,20}." warning="用户名不能是空，在2-20字符之间" size="16" maxlength="16" TABINDEX ="1" />&nbsp;&nbsp;<input name="submit" value="登录" type="submit" onFocus="this.blur()" class="submit"></label>
		<label>密码:<input type="password" name="user_password"  check=".{2,20}." warning="密码不能是空，在2-20字符之间" size="16" maxlength="16"  TABINDEX ="2" >
		<label>验证:<input  name="user_img"  check="^[0-9]{4,4}$" warning="验证码不正确"  type="text"  maxLength=4 size="8"  TABINDEX ="3" >
	<img src="../inc/GetCode.asp" alt="看不清楚请点击刷新验证码" style="cursor:pointer;" onclick="this.src='../inc/GetCode.asp?m='+Math.rnd()" />&nbsp;&nbsp;&nbsp;
	<!--<input  onclick="window.location='../index.asp'" type=button  class="submit" value="返回" name="Submit3">-->
	<a href='../' title='首页'>首页</a>
	</label>


	</form>
</div>
<%
End if
%>